// #include "tool.h"
#include "src/myfilter.hpp"

int main()
{
    /*
    Tools tool = Tools(22, "zheng");
    cout << tool.num << ", " << tool.user << endl;

    vector<string> vs = {"hi", " ", "cpp"};
    Tools tool1 = Tools(vs);
    string res = tool1.join_str();
    cout << "res: " << res << endl;
    */

    /*
    Point<int> p1(1, 2);
    Point<int> p2(1, 2);
    Point<int> p3(1, 3);
    Point<int> p4(4, 4);

    cout << (p1 == p2) << (p1 == p3) << (p1 == p4) << endl;

    Point<double> p11(1.023442, 2.42123);
    Point<double> p12(1.023442, 2.42123);
    Point<double> p13(1.02, 2.42123);
    Point<double> p14(1.03442, 2.123);

    cout << (p11 == p12) << (p11 == p13) << (p11 == p14) << endl;

    Point<float> p21(1.023442, 2.42123);
    Point<float> p22(1.023442, 2.42123);
    cout << (p21 == p22) << endl;
    */

    vector<Point<int>> vpi1 = {
        Point<int>(1, 2),
        Point<int>(1, 1),
        Point<int>(1, 3),
        Point<int>(10, 2),
        Point<int>(2, 2),
        Point<int>(3, 2),
    };
    vector<Point<int>> vpi2 = {
        Point<int>(3, 2),
        Point<int>(1, 2),
        Point<int>(10, 2),
        Point<int>(3, 2),
    };

    auto indexs = filter_point(vpi1, vpi2);
    for (const auto &i : indexs)
    {
        cout << i << ", ";
    }
    cout << endl;

    vector<Point<float>> vpf1 = {
        Point<float>(1.343204, 3.342312),
        Point<float>(2.343424, 3.332234),
        Point<float>(2.3, 3.3),
        Point<float>(1.4, 3.2),
        Point<float>(1.3434, 3.332),
        Point<float>(1.3204, 3.342),
    };
    vector<Point<float>> vpf2 = {
        Point<float>(1.3204, 3.342),  // 5
        Point<float>(1.4, 3.2),  // 3
        Point<float>(1.343204, 3.342312), // 0
    };

    auto res = filter_point(vpf1, vpf2);
    for(const auto& i : res)
    {
        cout << i << ", ";
    }
    cout << endl;

    return 0;
}